import request from '@/utils/request'

export default {
  getAllApprovedTasks(userInfo) {
    return request({
      url: 'http://47.97.66.178:5000//master_manage/master_tasks',
      method: 'post',
      data: userInfo
    })
  },
  getPushliedTasks(queryVo) {
    return request({
      url: 'http://47.97.66.178:5000//content/get_content',
      method: 'post',
      data: queryVo
    })
  },
  getWorkerTaskData(queryVo) {
    return request({
      url: 'http://47.97.66.178:5000//task/worker_task_data_tem',
      method: 'post',
      data: queryVo
    })
  },
  getWorkerTaskTable(queryVo) {
    return request({
      url: 'http://47.97.66.178:5000//manage/worker_tasks',
      method: 'post',
      data: queryVo
    })
  },
  getMasterTaskTable(queryVo) {
    return request({
      url: 'http://47.97.66.178:5000//master_manage/master_tasks',
      method: 'post',
      data: queryVo
    })
  },
  getMasterTaskData(queryVo) {
    return request({
      url: 'http://47.97.66.178:5000/task/master_task_data_tem',
      method: 'post',
      data: queryVo
    })
  },
  publishTask(queryVo) {
    return request({
      url: 'http://47.97.66.178:5000/task/send',
      method: 'post',
      data: queryVo
    })
  },
  claimATask(queryVo) {
    return request({
      url: 'http://47.97.66.178:5000/content/user_get_task',
      method: 'post',
      data: queryVo
    })
  },
  // 猎人修改任务状态
  switchTaskStatus(queryVo) {
    return request({
      url: 'http://47.97.66.178:5000/manage/change_worker_task_res',
      method: 'post',
      data: queryVo
    })
  },
  // 雇主修改任务状态
  switchMasterTaskStatus(queryVo) {
    return request({
      url: 'http://47.97.66.178:5000/master_manage/master_change_worker_task_res',
      method: 'post',
      data: queryVo
    })
  }
}
